<?php
class UserOrderAction extends CommonAction {

	public function detail(){		
		//获取订单信息
		$condition['id'] = $_REQUEST['id'];		
		$this->assign( "orderVo" , $this->CommonSimplequery($condition, "user_order",1));
		$this->display() ;
	}
	
	public function user(){
		//获取用户信息
		$condition['name'] = $_REQUEST['user_name'];		
		$this->assign( "userVo" , $this->CommonSimplequery($condition, "loginuser",1));
		$this->display() ;
	}
	
	/**
	 * 修改状态 
	 * 
	 */
	public function statusHandle(){		
		$model = D( "user_order" );		
		$id = $_REQUEST ['id'];		
		$condition['id'] = $id ;
		$vo = $this->CommonSimplequery($condition, "user_order",1);
		$data['status'];
		if($vo['status'] == 1){
			$data['status'] = 0  ;
		}else{
			$data['status'] = 1  ;
		}
   	    $this->resultHandle($model->where($condition)->save($data),"用户订单状态修改成功！","用户订单状态修改失败！") ;
	}
	
}
?>